home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 028.dms / 028.adf / Features_of_the_Shell / Redirection < prev    next >
Text File  |  1992-02-26  |  2KB  |  41 lines

  1.                             Redirection
  2.  
  3. Using the angle bracket (< and >) characters you can redefine the input and
  4. output of commands to a different destination.  As a default, input is from 
  5. the keyboard and output is via * (the current Shell or CLI window).
  6.  
  7. < is used to change input and > is used to change output.  You will find 
  8. many CLI commands spew out lines and lines of text when run.  For example, 
  9. SetPatch.  To stop this happening you redirect output of that command to
  10. a logical device called NIL:.  NIL: is basically a `bin' where you throw all
  11. the rubbish.  Other devices can be used too.  Here are a few examples...
  12.  
  13.         Dir >PRT: Df0:  gives a directory list of the disk in df0: and sends
  14.         it to the logical (assigned) device PRT: which means the printer
  15.         selected in Preferences.
  16.  
  17.         Dir >Testfile Df0: is similar but outputs the list as a text file
  18.         called testfile.
  19.  
  20.     >> is used for appending the output to a file.  This means that 
  21.     instead of putting the output in a file, it adds it to the end of a
  22.     file that already exists.  Use it instead of >
  23.  
  24.     Dir >>Testfile Df0: adds the directory listing of the disk in df0: to
  25.     the file, Testfile.
  26.  
  27.                 Changing the input can be interesting, too
  28.  
  29.         Date <Datefile ? loads the date from a file on disk.
  30.  
  31.     If you have an A1200 without an external clock, you can create a 
  32.     file  holding the current date so your files can be correctly 
  33.     datestamped.  This is very useful for Hard Drive users.
  34.  
  35.                 You can send a list of copied files to a destination, too
  36.  
  37.         Copy >List SYS:C to C-Commands:
  38.  
  39.                 The file is copied as usual but a list is created called
  40.                 List, which will be in the current directory.
  41.